#ifndef AIRFOIL_DIALOG_H
#define AIRFOIL_DIALOG_H

#include <QDialog>

#include <QTimer>
#include <QModelIndex>
#include <QFileSystemModel>
#include "common/parameters.h"
#include "common/qcustomplot.h"
#include "common/types.h"

class Param_widget_uav;

namespace Ui {
class Airfoil_dialog;
}

class Airfoil_dialog : public QDialog
{
    Q_OBJECT

public:
    explicit Airfoil_dialog(QWidget *parent = 0);
    ~Airfoil_dialog();
    void drawAirfoil(QCustomPlot *customPlot,QString path);
    void load_reference_curve(QString path, QVector<Point *> &output);
    void calc_reference_curve(const QString &path);
    QVector<Point *> get_reference_curve();

private slots:
    void on_search_field_line_textChanged(const QString &arg1);
    void on_listFiles_activated(const QModelIndex &index);
    void on_aceptar_button_pressed();
    void on_cancelar_button_pressed();
    void retranslateUi();

private:
    QFileSystemModel *dirModel;
    Ui::Airfoil_dialog *ui;
    QCPItemTracer *itemDemoPhaseTracer;
    QVector<Point*> reference_curve;
};

#endif // AIRFOIL_DIALOG_H
